from django.shortcuts import render
from django.http import HttpResponse


# Create your views here.
from .models import Stock_kData_zt


    
def test_function(request):

    html = "<html><body>测试函数</body></html>" 

    ztStockKDataDictList = list(Stock_kData_zt.objects.filter(code__startswith = '68').values('code','trade_date','close','change_pct','turn_rate_f','money_flow'))
    print('ztStockKDataDictList = ',ztStockKDataDictList)
    # days = getTradeDateInterval('20230601','20230605')
    # print('days = ',days)
    # updateHyBlockInfo()
    # df = get_block_zs_yczs_loc()
    # # df = get_block_zs_tdx_loc('gn')
    # print('df = ',df)
    # api=TdxHq_API()

    # with api.connect('119.147.212.81', 7709):
    #     data=[]
    #     for i in range(10):
    #             data+=api.get_index_bars(9,1,'880719',0,10)
    # print(api.to_df(data))
    # update_one_stock_kdata_day('sh.600733','2015-01-11','2023-04-28')

    return HttpResponse(html)



